<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div class="container"></div>
    <script>
        // 该页面被访问了
        const container = document.querySelector('.container')
        const num = JSON.parse(localStorage.getItem('num'))
        container.innerHTML = `该页面被访问了${num}次`
    </script>
</body>

</html>